package spring.my.db.sharding.demo;


import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.session.SessionAutoConfiguration;
import org.springframework.boot.web.servlet.ServletComponentScan;


@ServletComponentScan   // servlet bean 配置
@MapperScan(value = "spring.my.db.sharding.demo.dao.mapper", sqlSessionFactoryRef = "sqlSessionFactory") // mapper interface 路径
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class, SessionAutoConfiguration.class})   // 启动类 + 不使用默认的配置类
public class Application {

    private static final Logger log = LoggerFactory.getLogger(Application.class);

    public static void main(String[] args) {
        SpringApplication application = new SpringApplication();
        log.info("Application start....");
        application.run(Application.class, args);
        log.info("Application start success...");
    }
}
